<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // var 允许重复声明同一变量
    var var1 = 10
    var var1 = 20
    // let 不允许重复声明同一变量
    let var2 = 10
    // let var2 = 20
  </script>
</body>

</html>